<?php

namespace App\Entities\Base;

use Doctrine\ORM\Mapping as ORM;

/**
 * App\Entities\Base\Exploit
 *
 * @ORM\MappedSuperclass
 * @ORM\Table(name="`exploits`")
 */
class Exploit extends AbstractEntity
{
    /** Table name constant */
    const TABLE_NAME = 'exploits';

    /** Column name constants */
    const TITLE         = 'title';
    const URL_REFERENCE = 'url_reference';
    const SKILL_LEVEL   = 'skill_level';

    /**
     * @ORM\Id
     * @ORM\Column(name="`id`", type="integer", options={"unsigned":true})
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="`title`", type="string", length=255)
     */
    protected $title;

    /**
     * @ORM\Column(name="`url_reference`", type="string", length=255, nullable=true)
     */
    protected $url_reference;

    /**
     * @ORM\Column(name="`skill_level`", type="string", nullable=true)
     */
    protected $skill_level;

    /**
     * @ORM\Column(name="`created_at`", type="datetime")
     */
    protected $created_at;

    /**
     * @ORM\Column(name="`updated_at`", type="datetime")
     */
    protected $updated_at;

    public function __construct()
    {
    }

    /**
     * Set the value of id.
     *
     * @param integer $id
     * @return \App\Entities\Base\Exploit
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    /**
     * Get the value of id.
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set the value of title.
     *
     * @param string $title
     * @return \App\Entities\Base\Exploit
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get the value of title.
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set the value of url_reference.
     *
     * @param string $url_reference
     * @return \App\Entities\Base\Exploit
     */
    public function setUrlReference($url_reference)
    {
        $this->url_reference = $url_reference;

        return $this;
    }

    /**
     * Get the value of url_reference.
     *
     * @return string
     */
    public function getUrlReference()
    {
        return $this->url_reference;
    }

    /**
     * Set the value of skill_level.
     *
     * @param string $skill_level
     * @return \App\Entities\Base\Exploit
     */
    public function setSkillLevel($skill_level)
    {
        $this->skill_level = $skill_level;

        return $this;
    }

    /**
     * Get the value of skill_level.
     *
     * @return string
     */
    public function getSkillLevel()
    {
        return $this->skill_level;
    }

    /**
     * Set the value of created_at.
     *
     * @param \DateTime $created_at
     * @return \App\Entities\Base\Exploit
     */
    public function setCreatedAt($created_at)
    {
        $this->created_at = $created_at;

        return $this;
    }

    /**
     * Get the value of created_at.
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * Set the value of updated_at.
     *
     * @param \DateTime $updated_at
     * @return \App\Entities\Base\Exploit
     */
    public function setUpdatedAt($updated_at)
    {
        $this->updated_at = $updated_at;

        return $this;
    }

    /**
     * Get the value of updated_at.
     *
     * @return \DateTime
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * Get the display name for the entity
     *
     * @param bool $plural
     * @return string
     */
    public function getDisplayName(bool $plural = false): string
    {
        return $plural === false ? 'Exploit' : 'Exploits';
    }

    public function __sleep()
    {
        return array('id', 'title', 'url_reference', 'skill_level', 'created_at', 'updated_at');
    }
}